home *** CD-ROM | disk | FTP | other *** search
-
-
-
- FFFFiiiinnnnddddBBBBiiiinnnn((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) FFFFiiiinnnnddddBBBBiiiinnnn((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- FindBin - Locate directory of original perl script
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- use FindBin;
- use lib "$FindBin::Bin/../lib";
-
- or
-
- use FindBin qw($Bin);
- use lib "$Bin/../lib";
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Locates the full path to the script bin directory to allow
- the use of paths relative to the bin directory.
-
- This allows a user to setup a directory tree for some
- software with directories <root>/bin and <root>/lib and then
- the above example will allow the use of modules in the lib
- directory without knowing where the software tree is
- installed.
-
- If perl is invoked using the ----eeee option or the perl script is
- read from STDIN then FindBin sets both $Bin and $RealBin to
- the current directory.
-
- EEEEXXXXPPPPOOOORRRRTTTTAAAABBBBLLLLEEEE VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
- $Bin - path to bin directory from where script was invoked
- $Script - basename of script from which perl was invoked
- $RealBin - $Bin with all links resolved
- $RealScript - $Script with all links resolved
-
-
- KKKKNNNNOOOOWWWWNNNN BBBBUUUUGGGGSSSS
- if perl is invoked as
-
- perl filename
-
- and _f_i_l_e_n_a_m_e does not have executable rights and a program
- called _f_i_l_e_n_a_m_e exists in the users $ENV{PATH} which
- satisfies both ----xxxx and ----TTTT then FindBin assumes that it was
- invoked via the $ENV{PATH}.
-
- Workaround is to invoke perl as
-
- perl ./filename
-
-
- AAAAUUUUTTTTHHHHOOOORRRRSSSS
- Graham Barr <_b_o_d_g@_t_i_u_k._t_i._c_o_m> Nick Ing-Simmons
- <_n_i_k@_t_i_u_k._t_i._c_o_m>
-
-
-
- Page 1 (printed 10/23/98)
-
-
-
-
-
-
- FFFFiiiinnnnddddBBBBiiiinnnn((((3333)))) 22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222)))) FFFFiiiinnnnddddBBBBiiiinnnn((((3333))))
-
-
-
- CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
- Copyright (c) 1995 Graham Barr & Nick Ing-Simmons. All
- rights reserved. This program is free software; you can
- redistribute it and/or modify it under the same terms as
- Perl itself.
-
- RRRREEEEVVVVIIIISSSSIIIIOOOONNNN
- $Revision: 1.4 $
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 2 (printed 10/23/98)
-
-
-
-